package com.funtester.seven.day2;

public class Teacher extends People implements State {

    public static int teacherNum = 0;

    public Teacher() {
    }

    public Teacher(String name, int age, String school, boolean state) {
        super(name, age);
        this.school = school;
        this.state = state;
    }

    public String school;

    public boolean state;//true:上课;false:未上课

    @Override
    public void sayHi() {
        System.out.println("我是" + this.school + "的老师:" + name);
    }

    public void ask(Student student) {
        System.out.println(name + "说:" + student.name + "你来回答一下问题");
    }

    public void ask() {
        System.out.println(name + "说:同学们,谁来回答一下问题");
    }
    @Override
    public void state() {
        if (state) {
            System.out.println(this.name + "老师,正在上课");
        } else {
            System.out.println(this.name + "老师,没在上课");
        }
    }


}
